-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: upgrade ethers.js v6 #454
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @neel-ds for your patience and effort. I have tried everything locally and the build still fails. By the way, I have managed the next steps to successfully complete the update. You can follow this list.
- Add
// @ts-ignore
for getting rid ofTS2590: Expression produces a union type that is too complex to represent
. You can add the line before the tags in the line that the build error indicates to you. We can open an issue and tackle this error later since is non-blocking. - Update
vite
and@vitejs/plugin-react
to the latest versions on thedashboard
app. - Downgrade
chai
on contracts package to4.3.7
since >= v5 is ESM only. - Upodate
@typechain/hardhat
and@nomicfoundation/hardhat-ethers
to latest version oncontracts
app - Add the following missing dev dependency on
contracts
app
@nomicfoundation/hardhat-ignition
@nomicfoundation/hardhat-ignition-ethers
@nomicfoundation/ignition-core
- On the
dashboard
appindex.html
add the following script below the<body>
tag.<script> var global = global || window </script>
- Update
siwe
package to latest onapi
anddashboard
apps. - Add missing Node polyfills to
dashaboard
app.- Install
vite-plugin-node-polyfills
as dev dependency - Add them on
vite.config.ts
- Install
- Your PR introduces the
PROJECT_ID
environemnt variable in theauth-context.tsx
file on thedashboard
app.- Rename this to
VITE_PROJECT_ID
- Add the variable on the
.env.local
,.env.production
and.env.staging
with the value"bandada"
. - use
import.meta.env.VITE_PROJECT_ID!
instead ofprocess.env.PROJECT_ID!
- Rename this to
- The
auth_service.ts
file in theapi
app usesiweMessage.validate()
. This is deprecated, you can change it withsiweMessage.verify()
and change the expected output accordingly.
Let me know if you have any more comments / errors / thoughts on this. Happy to chat and gl with the remaining todos (should be quick!).
Thanks @0xjei, I will do the needful promptly. |
c8fe967
to
7fbebea
Compare
Thank you very much @0xjei for continuous support. I have completed the requested changes and rebased the branch with |
As we have discussed
Thank you so much for your effort @neel-ds. Could you please run |
cf69c56
to
8e2851b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great @neel-ds, thanks again for the extraordinary progress! Only the last 2 steps are missing eheh
- For the failed test on
auth.service
(Should throw an error if the signature is invalid
) you can delete this test case completely. After some research, the test is wrong and not needed. - Use
bandada.target
instead ofbandada.address
as mentioned in the other comment.
Looking forward to your changes 😎
8e2851b
to
bb219b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @neel-ds!!! Thank you so much for your effort, patience and work! Looking forward to collab again with you :)
ec3ac65
to
6f0316e
Compare
fix: resolve rebase conflicts fix: resolve rebase conflicts fix: resolve rebase conflicts fix: resolve rebase conficts fix: resolve rebase conflicts
fix: resolve rebase conflicts fix: resolve rebase conflicts
d5b50e3
to
a659eee
Compare
Description
Upgraded the ethers.js dependency to v6 across most apps. To support this upgrade, the dependency was also upgraded in the libs. Related dependencies like Wagmi, Rainbowkit, and Typescript were updated for compatibility. Currently experimenting with downgrading the typescript version to resolve remaining union-type errors.
Related Issue
This PR resolves the issue #366
Does this introduce a breaking change?
Other information